﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Sinbiota.Web.Models.TaxonCreateModel>" %>
<%@ Import Namespace="Localization" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%: Strings.AddTaxon %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2><%: Strings.AddTaxon %></h2>

    <%:Messages.ThisTaxonWillBeAddedBelow %>
    <br /><br />
    <strong><%:Strings.Name %></strong>:<%: Model.Parent.Name %><br />
    <strong><%:Strings.TaxonomicRank %></strong>: <%: Model.Parent.Rank %><br />

    <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm())
       {%>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
    
    <%: Html.HiddenFor(x => x.Parent.Id) %>
    <%: Html.HiddenFor(x => x.Parent.Name) %>
    <%: Html.HiddenFor(x => x.Parent.Rank) %>
    <div class="editor-label">
        <%: Html.LabelFor(model => model.TaxonName) %> <span class="required_field">(*)</span>
    </div>
    <div class="editor-field">
        <%: Html.TextBoxFor(model => model.TaxonName) %>
        <%: Html.ValidationMessageFor(model => model.TaxonName) %>
    </div>

    <div class="editor-label">
        <%: Html.LabelFor(model => model.TaxonRank) %> <span class="required_field">(*)</span>
    </div>
    <div class="editor-field">
        <select id="TaxonRank" name="TaxonRank">
             <% foreach (var rank in Model.RankList)
            { %> <option value="<%: rank %>"><%: rank %></option> <% } %>
            
        </select>
    </div>

    <div class="editor-label">
        <%: Html.LabelFor(model => model.TaxonReference) %> <span class="required_field">(*)</span>
    </div>
    <div class="editor-field">
        <%: Html.TextAreaFor(model => model.TaxonReference)%>
        <%: Html.ValidationMessageFor(model => model.TaxonReference)%>
    </div>



        <div class="display-field">
            <input type="submit" value="<%: Strings.Create %> <%:Strings.Taxon %>" />
        </div>
    </fieldset>
    <% } %>
    <div class="small button radius">
        <%: Html.ActionLink(Strings.GoBack, "Details", new {id = Model.Parent.Id}) %>
    </div>


</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
